//public class Duanxin {
//
//    public static void main(String[] args) {
//        /**
//         * 短信api
//         * @param pohnenum
//         * @return
//         * @throws Exception
//         */
//        @RequestMapping("PhoneCode")
//        @ResponseBody
//        public ResponseMassage PhoneCode(String pohnenum) throws Exception {
//            logger.info("UserController-PhoneCode-pohnenum:" + pohnenum);
//            ResponseMassage msg=new ResponseMassage();
//
//            com.aliyun.dysmsapi20170525.Client client = UserController.createClient("LTAI5tH3KikaY3jfYJziktnw", "VHDs20dZ5J9IH74UyYXhdfqYlxPwKU");
//            logger.debug("UserController-PhoneCode-pohnenum:" + pohnenum+" client: "+client);
////        1000-9000随机数作为验证码
//            int i = (int) (Math.random() * 9000 + 1000);
//            logger.debug("UserController-PhoneCode-pohnenum:" + pohnenum+" i: "+i);
//
//            SendSmsRequest sendSmsRequest = new SendSmsRequest()
//                    .setSignName("阿里云短信测试")
//                    .setTemplateCode("SMS_154950909")
//                    .setPhoneNumbers(pohnenum)
//                    .setTemplateParam("{\"code\":\"" + i + "\"}");
//            RuntimeOptions runtime = new RuntimeOptions();
//            SendSmsResponse resp = client.sendSmsWithOptions(sendSmsRequest, runtime);
//            logger.debug("UserController-PhoneCode-pohnenum:" + pohnenum+" resp: "+resp);
//
//            com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(TeaModel.buildMap(resp)));
//            msg.setData(i);
//            return msg;
//        }
//
//        public static com.aliyun.dysmsapi20170525.Client createClient(String accessKeyId, String accessKeySecret) throws Exception {
//            Config config = new Config()
//                    // 您的 AccessKey ID
//                    .setAccessKeyId("LTAI5tH3KikaY3jfYJziktnw")
//                    // 您的 AccessKey Secret
//                    .setAccessKeySecret("VHDs20dZ5J9IH74UyYXhdfqYlxPwKU");
//            // 访问的域名
//            config.endpoint = "dysmsapi.aliyuncs.com";
//            return new com.aliyun.dysmsapi20170525.Client(config);
//        }
//    }
//}

